﻿

namespace EFCoreLenarn
{
    /// <summary>
    /// 像这种 是双向导航属性
    /// </summary>
    public class Article
    {
        public long Id { get; set; }
        public string? Title { get; set; }
        public string? Content { get; set; }
        public List<Comment>? Comments { get; set; } = new List<Comment>();
    }

    public class Comment
    {
        public long Id { get; set; }
        public long ArticleId { get; set; }
        public Article Article { get; set; }
        public string? Message { get; set; }

    }
}
